import http from '@/utils/request'

//获取所有角色
// export const getAllRoleApi =(param={type:'1'})=> http.get('/role/getRole',{param})

export const getAllRoleApi = (params = {type:'1'}) => http.get('/role/getRole', { params })

//分配角色

export const assignmentRoleApi = (params = {}) => http.post('role/roleAssignment', params)

//添加用户

export const addUserApi = (params = {}) => http.post('users/addUser', params)    

//修改用户

export const updateRoleApi = (params = {}) => http.post('users/updateUser', params)

//添加角色

export const addRoleApi = (params = {}) => http.post('role/addRole', params)